package com.itheima.HomeWork.Exer;

import java.io.File;
import java.text.SimpleDateFormat;

public class Demo03 {
    public static void main(String[] args) {
        File file = new File("E:\\ttt");
        long l = file.lastModified();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
        System.out.println(simpleDateFormat.format(l));
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isFile()&&file1.getName().endsWith(".txt")){
                System.out.println(file1);
            }
        }
    }
}
